import { create } from 'zustand'
import { devtools } from 'zustand/middleware'

export const useBearStore = create(
  devtools(
    set => ({
      bears: 0,
      increasePopulation: () => set(state => ({ bears: state.bears + 1 })),
      removeAllBears: () => set({ bears: 0 })
    }),
    {
      name: 'bearStore',
      enabled: false
    }
  )
)
